package org.jingouzhui.test.infrastructure;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.jingouzhui.infrastructure.persistent.dao.IRuleTreeDAO;
import org.jingouzhui.infrastructure.persistent.dao.IRuleTreeNodeDAO;
import org.jingouzhui.infrastructure.persistent.dao.IRuleTreeNodeLineDAO;
import org.jingouzhui.infrastructure.persistent.po.RuleTree;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

/**
 * @description: 规则树测试
 * @author: jingouzhui
 * @date: 2025/5/3 14:41
 */
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class RuleTreeTest {

    @Resource
    private IRuleTreeDAO ruleTreeDAO;

    @Resource
    private IRuleTreeNodeDAO ruleTreeNodeDAO;

    @Resource
    private IRuleTreeNodeLineDAO ruleTreeNodeLineDAO;

    @Test
    public void test_ruleTree(){
        RuleTree treeLock1 = ruleTreeDAO.queryRuleTreeByTreeId("tree_lock_2");
        log.info(JSON.toJSONString(treeLock1));
    }
}
